package leetcode_题库;

import java.util.Arrays;

/**
 * Created by IntelliJ IDEA.
 *
 * @Author : Ding
 * @create 2022/8/19 10:37
 */
public class _344_反转字符串中的单词_3 {
    public static void main(String[] args) {
        String s = "Let's take LeetCode contest";

        String[] strings = s.split(" ");
        StringBuilder ret = new StringBuilder();
        for (String string : strings) {
            ret.append(new StringBuilder(string).reverse()).append(" ");
        }
        ret.deleteCharAt(ret.length()-1);
        System.err.println(ret.toString());
        /*

            > 2022/08/19 11:08:18
            解答成功:
                执行耗时:3 ms,击败了91.74% 的Java用户
                内存消耗:41.7 MB,击败了79.36% 的Java用户

         */
    }
}
